package com.cdu.guoxinan.www.smartcom.service;

import com.cdu.guoxinan.www.smartcom.domian.dto.ResidentQueryDTO;
import com.cdu.guoxinan.www.smartcom.domian.pojo.Resident;
import com.cdu.guoxinan.www.smartcom.domian.pojo.User;
import com.cdu.guoxinan.www.smartcom.unit.model.R;
import com.github.pagehelper.PageInfo;

public interface ResidentService {

    PageInfo<Resident> queryPage(ResidentQueryDTO residentQueryDTO);

    boolean add(Resident resident);

    boolean update(Resident resident);

    boolean delete(Integer id);

    Resident findByUsername(String name);

    /**
     * 根据用户ID查询居民信息
     */
    Resident findByUserId(Long userId);

    R setUser(User user, Integer residentId);
    Resident findResidentByUserId(Integer userId);


}
